const {
  override, fixBabelImports, addLessLoader, addWebpackModuleRule,
} = require('customize-cra');

module.exports = override(
  addWebpackModuleRule({ test: /\.bpmn$/, use: 'raw-loader' }),
  fixBabelImports('import', {
    libraryName: 'antd',
    libraryDirectory: 'es',
    style: true,
  }),
  addLessLoader({
    javascriptEnabled: true,
    modifyVars: {
      '@border-radius-base': '10px',
      '@card-radius': '@border-radius-base',
      '@primary-color': '#2D5F96', // 全局主色
    },
  }),
);
